<?php
declare(strict_types=1);

use think\facade\Route;
use SixShop\Lakala\Controller\Admin\{
    ProfitShareReceiverController,
    ProfitShareOrderController,
    TradeOrderController
};
use SixShop\System\Middleware\MacroPageMiddleware;
// Admin路由
// 路由前缀: /admin/lakala
//
// 如果需要登录请添加认证中间件auth
// ->middleware(['auth'])

Route::resource('profit_share_receiver', ProfitShareReceiverController::class, function () {
    Route::put('apply', [ProfitShareReceiverController::class, 'apply']);
    Route::put('bind', [ProfitShareReceiverController::class, 'bind']);
    Route::put('modify', [ProfitShareReceiverController::class, 'modify']);
})
    ->middleware(['auth', MacroPageMiddleware::class]);

Route::resource('profit_share_order', ProfitShareOrderController::class)
    ->middleware(['auth', MacroPageMiddleware::class]);

Route::resource('trade_order', TradeOrderController::class, function (){
    Route::put('express_company', [TradeOrderController::class, 'updateExpressCompany']);
})
    ->middleware(['auth', MacroPageMiddleware::class]);